package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbAdviceType entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_ADVICE_TYPE", schema = "dbo", catalog = "AGDB")
public class TbAdviceType implements java.io.Serializable {

	// Fields

	private String atId;
	private String atAdviceType;
	private String a;
	private String b;
	private String c;
	private Set<TbDisposalAdvice> tbDisposalAdvices = new HashSet<TbDisposalAdvice>(
			0);

	// Constructors

	/** default constructor */
	public TbAdviceType() {
	}

	/** minimal constructor */
	public TbAdviceType(String atId) {
		this.atId = atId;
	}

	/** full constructor */
	public TbAdviceType(String atId, String atAdviceType, String a, String b,
			String c, Set<TbDisposalAdvice> tbDisposalAdvices) {
		this.atId = atId;
		this.atAdviceType = atAdviceType;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbDisposalAdvices = tbDisposalAdvices;
	}

	// Property accessors
	@Id
	@Column(name = "AT_ID", unique = true, nullable = false, length = 4)
	public String getAtId() {
		return this.atId;
	}

	public void setAtId(String atId) {
		this.atId = atId;
	}

	@Column(name = "AT_ADVICE_TYPE", length = 30)
	public String getAtAdviceType() {
		return this.atAdviceType;
	}

	public void setAtAdviceType(String atAdviceType) {
		this.atAdviceType = atAdviceType;
	}

	@Column(name = "A", length = 60)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 60)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 60)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbAdviceType")
	public Set<TbDisposalAdvice> getTbDisposalAdvices() {
		return this.tbDisposalAdvices;
	}

	public void setTbDisposalAdvices(Set<TbDisposalAdvice> tbDisposalAdvices) {
		this.tbDisposalAdvices = tbDisposalAdvices;
	}

}